package com.lzy.mall.ware.dao;

import com.lzy.mall.common.vo.SkuStockVO;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.mapper.BaseMapper;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.springframework.stereotype.Repository;
import com.lzy.mall.ware.entity.WmsWareSku;

import java.util.List;

/**
 * 商品库存(WmsWareSku)表数据库访问层
 *
 * @author lzy
 * @since 2021-08-24 19:01:59
 */

@Repository
@SqlResource("WmsWareSku")
public interface WmsWareSkuDao extends BaseMapper<WmsWareSku> {
    List<SkuStockVO> getSkuStock();

    Integer lockSkuStock(@Param("skuId") Long skuId,@Param("wareId") Long wareId,@Param("num") Integer num);

    void unLockStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("num") Integer num);
}
